/*
 * Address.java
 *
 * Created on 3 wrzesień 2007, 20:13
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package pl.krakow.ae.knp.wikiboard.utils;

/**
 *
 * @author slawek
 */
public class Address {

    private String host;
    private int port;
    
    /** Creates a new instance of Address */
    public Address(String address) {
        String[] a = address.split(":",2);
        if(a[0] == null || a[1] == null)
            throw new NullPointerException();
        this.host = a[0];
        this.port = Integer.parseInt(a[1]);
    }
    
    public String getHost() {
        return this.host;
    }
    
    public int getPort() {
        return this.port;
    }
}
